import moment from 'moment';

export const getLocalDate = () => {
  return moment(new Date()).format('YYYY-MM-DD');
};

export const getLocalDateTime = () => {
  return moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
};

export const getLocalTime = () => {
  return moment(new Date()).format('HH:mm:ss');
};

export const formatDate = (date: Date, format: string) => {
  return moment(date).format(format);
};

export const getTime = () => {
  return new Date().getTime();
};
